<form class="form" novalidate name="pwdForm">
    <div class="modal-header">
        <h4 class="modal-title">
            <span ng-if="vm.item">密码编辑</span>
            <span ng-if="!vm.item">基本资料</span>
        </h4>
    </div>
    <div class="modal-body">
        <div class="form-group height-60">
            <label for="name">名称<span class="require"></span></label>
            <input type="text" name="name" ng-class="{error: pwdForm.name.$invalid && !pwdForm.name.$pristine}" ng-blur="vm.checkValid(pwdForm.name)" class="form-control" ng-model="vm.data.name" id="name" required placeholder="名称" />
            <span class="error" ng-show="pwdForm.name.$invalid && !pwdForm.name.$pristine">名称不能为空</span>
        </div>
        <div class="form-group height-60">
            <label for="effectDays">密码生命周期(天)</label>
            <input type="text" name="effectDays" ng-class="{error: pwdForm.effectDays.$invalid && !pwdForm.effectDays.$pristine}" ng-blur="vm.checkValid(pwdForm.effectDays)" ng-pattern="/\d+/" class="form-control" ng-model="vm.data.effectDays" id="effectDays" placeholder="密码生命周期" />
            <span class="error" ng-show="pwdForm.effectDays.$invalid && !pwdForm.effectDays.$pristine">密码生命周期只能是数字</span>
        </div>
        <div class="form-group height-60">
            <label for="warnDays">密码提醒时间(天)</label>
            <input type="text" name="warnDays" ng-class="{error: pwdForm.warnDays.$invalid && !pwdForm.warnDays.$pristine}" ng-blur="vm.checkValid(pwdForm.warnDays)" ng-pattern="/\d+/" class="form-control" ng-model="vm.data.warnDays" id="warnDays" placeholder="密码提醒时间" />
            <span class="error" ng-show="pwdForm.warnDays.$invalid && !pwdForm.warnDays.$pristine">密码提醒时间只能是数字</span>
        </div>
        <div class="form-group height-60">
            <label for="reuseIntervalDays">密码重用时间间隔</label>
            <input type="text" name="reuseIntervalDays" ng-class="{error: pwdForm.reuseIntervalDays.$invalid && !pwdForm.reuseIntervalDays.$pristine}" ng-blur="vm.checkValid(pwdForm.reuseIntervalDays)" ng-pattern="/\d+/" class="form-control" ng-model="vm.data.reuseIntervalDays" id="reuseIntervalDays" placeholder="密码重用时间间隔" />
            <span class="error" ng-show="pwdForm.reuseIntervalDays.$invalid && !pwdForm.reuseIntervalDays.$pristine">密码重用时间间隔只能是数字</span>
        </div>
        <div class="form-group height-60">
            <label for="pattern">密码重用次数间隔</label>
            <input type="text" name="reuseIntervalNums" ng-class="{error: pwdForm.reuseIntervalNums.$invalid && !pwdForm.reuseIntervalNums.$pristine}" ng-blur="vm.checkValid(pwdForm.reuseIntervalNums)" ng-pattern="/\d+/" class="form-control" ng-model="vm.data.reuseIntervalNums" id="reuseIntervalNums" placeholder="密码重用次数间隔" />
            <span class="error" ng-show="pwdForm.reuseIntervalNums.$invalid && !pwdForm.reuseIntervalNums.$pristine">密码重用次数间隔只能是数字</span>
        </div>
        <div class="form-group height-60">
            <label for="pattern">密码重用复杂度</label>
            <input type="text" name="pattern" ng-class="{error: pwdForm.pattern.$invalid && !pwdForm.pattern.$pristine}" ng-blur="vm.checkValid(pwdForm.pattern)" class="form-control" ng-model="vm.data.pattern" id="pattern" placeholder="密码重用复杂度" />
            <!--<span class="error" ng-show="pwdForm.pattern.$invalid && !pwdForm.pattern.$pristine">密码重用复杂度不能为空</span>-->
        </div>
        <div class="form-group">
            <label for="remark">描述</label>
            <textarea class="form-control" name="remark" id="remark" ng-model="vm.data.remark" cols="30" rows="5" placeholder="控件描述"></textarea>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-primary btn-xl" ng-disabled="pwdForm.$invalid" ng-click="vm.save()"><span ng-if="vm.submitting"><i class="fa fa-spin fa-spinner"></i></span>保存</button>
        <button type="button" class="btn btn-default btn-xl" ng-click="vm.cancel()">取消</button>
    </div>
</form>